import tensorflow as tf
a = tf.Variable([True, False, False, True, False, True, False, True, False, True, False, True])
b = tf.Variable([0.2, 0.6, 1.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])
# auc_tensor = tf.contrib.metrics.streaming_auc(b, a)
auc_tensor = tf.metrics.auc(a, b)
sess = tf.Session()
sess.run(tf.initialize_all_variables())
sess.run(tf.initialize_local_variables()) # try commenting this line and you'll get the error
for i in range(100):
    print('auc after batch %d: :' % i, sess.run(auc_tensor))
print('Final auc: %f' % sess.run(auc_tensor)[0])
